

public class worker implements Runnable{

	private octopus_context oxc;
	private String oxcSerial;
	
	public worker(octopus_context oc, String serial) {
		oxc = oc;
		oxcSerial = serial;
 	}

	public void run() {
		octopus.octopus_init(oxc);
		octopus.octopus_open_serial(oxc, oxcSerial);
		String desc = new String();
		while (true) {
			/*try {
			Thread.sleep(1000);
			} catch (Exception e) {}*/
			System.out.println(octopus.octopus_get_hwdesc(oxc, desc));
			//System.out.println(desc + " : " + oxcSerial);
		}
		
	}

	public static void main(String[] arg){
		
		System.loadLibrary("octopus");
	
		octopus_context xio1 = new octopus_context();
		//octopus_context xio2 = new octopus_context();
		
		System.out.println("Start...");
		
		Thread t1 = new Thread(new worker(xio1, "20081108"));
		t1.start();
		//Thread t2 = new Thread(new worker(xio2, "20081109"));
		//t2.start();
		
	}
	
}
